﻿using Castle.MicroKernel.Lifestyle.Scoped;

namespace Grove {
	using Caliburn.Micro;
	using Ui.Shell;

	public class Bootstrapper : Bootstrapper<IShell> {
		private static ILifetimeScope _scope;

		public static ILifetimeScope GetScope() {
			return _scope ?? (_scope = new DefaultLifetimeScope());
		}

		public static void NewGame() {
			if (_scope != null)
				_scope.Dispose();

			_scope = null;
		}

	}

}